<?php
/**
 * Created by PhpStorm.
 * User: sykbxc
 * Date: 2019/1/20
 * Time: 10:15
 */

namespace App\Response;

trait TableRep
{
    public function table($res)
    {
        $result = [
            'code' => 0,
            'msg' => '成功',
            'count' => $res['total'],
            'data' => $res['data']
        ];
        return response()->json($result);
    }

}